A modern embedded system can include on-chip debug (OCD) hardware to assist in the debugging of software applications running on the embedded system. Considering that many bugs on embedded systems are intermittent and are caused by complex interactions between software and hardware peripherals, it should be appreciated that conventional line-by-line application source code debugging may never capture an intermittent hardware bug that only manifests itself when the application is running on the embedded system at real-time speed. The OCD hardware enables the software application running on the embedded system to be debugged in real-time. Additionally, the OCD hardware does not require modification of the software application to support debugging operations. The OCD hardware typically enables operations such as halting the processor, examining registers and memory, setting instruction breakpoints, setting data access watchpoints, and recording instruction traces.
An instruction trace is a record of all processor instructions executed on the embedded system within a given period of time with the application running on the embedded system at real-time speed. The OCD hardware module supports the recording of an instruction trace that captures all instructions that are performed between two breakpoints. Therefore, an instruction trace recorded with the OCD hardware module provides the software application developer with an exhaustive description of the processor instructions that are executed between two breakpoints. An instruction trace associated with an application running at real-time speed is likely to include an enormous number, e.g., thousands, of instructions. Consequently, although the instruction trace may include the particular information needed by the developer to diagnose a problem with the application, the enormous number of instructions listed in the instruction trace obscures the problem and can render the instruction trace essentially undecipherable by the developer.
In view of the foregoing, a solution is needed to facilitate understanding of an instruction trace recorded by OCD hardware for an application running in real-time on an embedded device.